package com.rem.designPattern.strategy策略;

/**
 * @author Rem
 * @date 2022-11-27
 */
public interface Strategy {
    /**
     * 展示促销
     */
    void show();
}

/**
 * 为春节准备的促销活动
 */
class SpringStrategy implements Strategy {

    @Override
    public void show() {
        System.out.println("买一送一");
    }
}

/**
 * 为中秋准备的促销活动
 */
class MidAutumnStrategy implements Strategy {

    @Override
    public void show() {
        System.out.println("满200元减50元");
    }
}

/**
 * 为圣诞准备的促销活动C
 */
class ChristmasStrategy implements Strategy {

    @Override
    public void show() {
        System.out.println("满1000元加一元换购任意200元以下商品");
    }
}